package com.example.sync.handler;

import com.example.sync.po.SysASyncJob;

/**
 * @author chentao
 * @version 1.0
 * @description: TODO
 * @date 2025/3/22 下午2:44
 */
public interface IHandler {

    public String getType();

    public boolean isMatch(SysASyncJob sysASyncJob);

    public int getRetryPeriod();

    public void handle(SysASyncJob sysASyncJob) throws Exception;

    public Long publish(String modelName, Long modelId, String modelKey, String targetModel, Object targetContext) throws Exception;

    public Long publish(String modelName, Long modelId, String modelKey, String targetModel, Object targetContext , Long serverId) throws Exception;

    public void failure(SysASyncJob sysASyncJob);

    public void success(SysASyncJob sysASyncJob);
}
